<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/9
 * Time: 11:00
 */
require_once '../DbTools.php';

$userkey = $_COOKIE['userkey'];
$username = $_COOKIE['username'];
session_start();
if(!empty($_SESSION[$userkey]['usercard'])){
    echo '欢迎你：'.$username;
}else{
    echo '<a href="../login.php">尚未登录，请登录</a>';
}

$logUrl = '../img'.$_GET['log'];
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
        <a href="updatepwdUi.php"><button type="button">修改密码</button></a>
        <p>头像：<img src="<?php echo $logUrl;?>" ></p>
        <form action="img.php" method="post" enctype="multipart/form-data">
            <input type="file" name="file">
            <br/>
            <button type="submit">上传头像</button>
        </form>
	</body>
</html>
